Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable special characters in UI5 control ids #159

Merged
merged 9 commits into from
Mar 4, 2022
Merged

Conversation

dominikfeininger
Copy link
Collaborator

  • change wdio selector from id to xpath
  • basic check for selector structure

id: 'Title::NoAction.h1',
viewName: "test.Sample.view.Main"
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please apply prettier formatting on the file :)

expect(titleWwdio).toEqual('UI5 demo');
});

it.only('check for invalid control selector', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm .only

@@ -142,6 +142,20 @@ function _createWdioUI5KeyFromSelector(selector: wdi5Selector): string {

export async function addWdi5Commands() {
browser.addCommand("_asControl", async (wdi5Selector: wdi5Selector) => {
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest to outsource this in a separate function.

  1. there will be more conditional checks in the future (e.g. controlType && viewName OR only id)
  2. we should be more specific with the error, e.g. selector is missing the "selector" object

@dominikfeininger dominikfeininger changed the title WIP: Feature/118 xpath Enable special characters in UI5 control ids Mar 3, 2022
Copy link
Contributor

@vobu vobu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mini thingies still left, almost good to go!

@@ -12,6 +12,7 @@ import { clientSide__navTo } from "../../client-side-js/_navTo"

import { Logger as _Logger } from "./Logger"
const Logger = _Logger.getInstance()
// test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls remove

* @param wdi5ControlSelector
* @returns {Boolean} if the givven selector is a valid selector
*/
function _verifySelector(wdi5ControlSelector) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the type here: wdi5ControlSelector: wdi5Selector

/**
* does a basic validation of a wdi5ControlSelector
* @param wdi5ControlSelector
* @returns {Boolean} if the givven selector is a valid selector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "givven"
type "Boolean" -> "boolean"

@vobu vobu merged commit 352db78 into main Mar 4, 2022
@vobu vobu deleted the feature/118-xpath branch March 4, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants